package copyengine.resource.resProxy.cachePool
{
    import copyengine.resource.resProxy.cacheData.CEResCacheDataBasic;

    import flash.utils.Dictionary;

    public class CEResCachePool
    {
        private static var mInstance:CEResCachePool

        public static function get instance():CEResCachePool
        {
            if (mInstance == null)
            {
                mInstance = new CEResCachePool();
            }
            return mInstance;
        }

        private var mAllResCacheDataDic:Dictionary;

        public function CEResCachePool()
        {
            mAllResCacheDataDic = new Dictionary();
        }

        public function getResCacheData(_resName:String):CEResCacheDataBasic
        {
            return mAllResCacheDataDic[_resName];
        }

        public function setResCacheData(_resName:String, _resCacheData:CEResCacheDataBasic):void
        {
            mAllResCacheDataDic[_resName] = _resCacheData;
        }

        public function deleteResCacheData(_resName:String):void
        {
            mAllResCacheDataDic[_resName] = null;
            delete mAllResCacheDataDic[_resName];
        }

    }
}